﻿using System;
using System.Linq;

class Program
{
    static bool IsBiggenThanItsNeighbours(int[] array, int possition)
    {
        if (possition < 0 || possition > array.Length-1)
        {
            return false;
        }
        else if (possition != 0 && possition != array.Length - 1)
        {
            if (array[possition] > array[possition - 1] && array[possition] > array[possition + 1])
            {
                return true;
            }

        }
        else if (possition==0)
        {
            if (array[possition] > array[possition + 1])
            {
                return true;
            }
        }
        else if (possition == array.Length-1)
        {
            if (array[possition] > array[possition - 1])
            {
                return true;
            }
        }

        return false;
    }

    static void Main()
    {
        int[] myArray = { 5, 4, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 5, 5, 5, 6, 6, 7, 8 };
        int posstion = int.Parse(Console.ReadLine());

        Console.WriteLine(IsBiggenThanItsNeighbours(myArray, posstion));
    }
}

